<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var MyStack = function () {
            this.que = []
        };

        /** 
         * @param {number} x
         * @return {void}
         */
        MyStack.prototype.push = function (x) {
            this.que.push(x)
        };

        /**
         * @return {number}
         */
        MyStack.prototype.pop = function () {
            return this.que.pop()
        };

        /**
         * @return {number}
         */
        MyStack.prototype.top = function () {
            return this.que[this.que.length-1]
        };

        /**
         * @return {boolean}
         */
        MyStack.prototype.empty = function () {
            return this.que.length>0
        };

        /**
         * Your MyStack object will be instantiated and called as such:
         * var obj = new MyStack()
         * obj.push(x)
         * var param_2 = obj.pop()
         * var param_3 = obj.top()
         * var param_4 = obj.empty()
         */
    </script>
</body>

</html>